package com.slipper.sfts.order.service.support;

import com.slipper.PaasContext;
import com.slipper.common.util.StringUtil;
import com.slipper.sfts.order.service.IDealer;
import com.slipper.sfts.stock.service.StockOrderService;
import com.slipper.qmt.vo.OrderVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class OrderDealer implements IDealer<OrderVO> {
    private static final Logger logger = LoggerFactory.getLogger(OrderDealer.class);

    @Override
    public void doDeal(OrderVO vo) {
        logger.info("接收到下单回调消息：{}", vo);
        if (StringUtil.isBlank(vo.getOrderRemark())) return;
        PaasContext.getBean(StockOrderService.class).dealOrder(vo);
    }
}
